Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last minute NUOPC Connector items for ESMF 8.7 #294

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

theurich
Copy link
Member

Adding connection options support for regridding method "conserve_2nd" and extrapolation method "nearest_d". NRL NEPTUNE developers are hoping to use "conserve_2nd" with ESMF 8.7.

This PR also removes old code from NUOPC_Connector that has been inactive for several releases now. This is code that had been under the #ifdef USE_ESMF_RHL #else branches.

Copy link
Member

@danrosen25 danrosen25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as long as the tests pass. We don't have explicit tests for remapMethod and they would be located with the NUOPC app prototypes. I didn't know that type RHL was moved into the ESMF library as ESMF_RHL. We should consider moving this to ESMF_RouteHandleList in the future but that's a bigger cleanup.

@danrosen25
Copy link
Member

danrosen25 commented Sep 10, 2024

@theurich @billsacks
I looked at the failure and it's an issue I've seen before and I still approve this PR with this failure. There was an issue for it but it was closed without resolving.

20240910 215612.746 INFO             PET4  FAIL  Check time delay on non-blocking Component D Finalize/wait, ESMF_CompTunnelUTest.F90, line 1283:  Incorrect time delay
20240910 215612.746 INFO             PET4  delayTime (wait) =    2.9923109999999973

What's happening is that the time between ESMF_GridCompFinalize and ESMF_GridCompWait is less 3 seconds but the test assumes it will take greater than 3 seconds. Mac OS systems are finishing too quickly!

call ESMF_GridCompFinalize(dualCompD, syncflag=ESMF_SYNC_NONBLOCKING, &

call ESMF_GridCompWait(dualCompD, userRc=userRc, rc=rc)

A possible solution could be to change the test to be something much smaller, like 1 second. I'm not sure why it's 3 seconds.

call ESMF_Test(delayTime > SLEEPTIME-2*precTime, name, failMsg, result, ESMF_SRCLINE)

@theurich
Copy link
Member Author

There are several reasons the CompTunnelUTest can fail. #237 discusses the socket issues. Here it is a timing issue - which is different.
There is a call to ESMF_VMWtimeDelay with 3 seconds in the test. The 3s are set by macro SLEEPTIME. For some reason either the clock precision is not determined correctly or there is some drifting of the clock or the WtimeDelay.. but just sometimes. I guess we could build in a larger tolerance than just 2x the clock precision. But it is a strange thing why Macs would need that.

Copy link
Contributor

@oehmke oehmke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@danrosen25
Copy link
Member

@theurich
Okay, I see. I did think it was odd that finalize was expected to take longer than 3 seconds but now I see the call to ESMF_VMWtimeDelay. I assume that the ESMF_VMWtimeDelay calls sleep under the hood? It doesn't seem possible that the time between ESMF_VMWtime calls is less than 3 seconds. So I assume there's something going on within the system. I believe the runners are VMs so it's possible that the VM server messes around with the system clock?

@theurich theurich self-assigned this Sep 10, 2024
@theurich theurich merged commit 49bd433 into develop Sep 11, 2024
5 of 6 checks passed
@theurich theurich deleted the fix/nuopc-connector-regrid branch September 11, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants